use crate::handlers::user_handler as UserHandler;
use actix_web::{web, Scope};

pub struct UserRoutes;

impl UserRoutes {
    pub fn init() -> Scope {
        web::scope("/user")
            .route("/create", web::post().to(UserHandler::create))
            .route("/update", web::post().to(UserHandler::update))
            .route("/delete", web::post().to(UserHandler::delete))
            .route("/info", web::get().to(UserHandler::info))
            .route("/page", web::get().to(UserHandler::page))
            .route("/detail", web::get().to(UserHandler::detail))
            .route("/change", web::post().to(UserHandler::change_password))
            .route("/reset", web::post().to(UserHandler::reset_password))
            .route("/modify", web::post().to(UserHandler::modify))
    }
}
